<%@page contentType="text/html;charset=utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>当当图书 – 全球最大的中文网上书店</title>
		<link href="../css/book.css" rel="stylesheet" type="text/css" />
		<link href="../css/second.css" rel="stylesheet" type="text/css" />
		<link href="../css/secBook_Show.css" rel="stylesheet" type="text/css" />
		<link href="../css/list.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../js/jquery-1.4.3.js"></script>
		<script type="text/javascript" charset=utf-8 src="../js/sort.js"></script>
		<script type="text/javascript" charset=utf-8 src="../js/buy.js"></script>
	</head>
	<body>
		&nbsp;

		<!-- 头部开始 -->
		<%@include file="../common/head.jsp"%>
		<!-- 头部结束 -->

		<div style="width: 962px; margin: auto;">
			<a href="#"><img src="../images/default/book_banner_081203.jpg" border="0" /> </a>
		</div>
		<div class='your_position'>
			在:&nbsp;
			<!--  -->
			<s:if test="classes!=null"></s:if>
			<a href='#' style="color:green">全部图书&nbsp;</a> 
			<s:iterator value="cats">
			<s:if test="cid==id">
			&gt;&gt;
			<font style='color: #cc3300'><strong>${name} </strong> </font>
			</s:if>
			</s:iterator>&nbsp;中搜索 <span style="font-size:15px">${keyWords}</span> 找到  &nbsp;&nbsp;<span style="color:red">${totalNum}</span>&nbsp;&nbsp;件产品 
			<font style='color: #cc3300'><strong>${classes} </strong> </font>
			
			
			
		</div>

		<div class="book">
			
			<!--左栏开始-->
			<div id="left" class="book_left">
				<div id="__fenleiliulan">
					<div class=second_l_border2>
						<h2>
							搜索结果分类
						</h2>
						<ul>
							<li>
								<div>
									<div class=second_fenlei>
										<s:if test="cid==1">
										<a href="bookList.action?parentId=${parentId}&cid=1&sort=${sort}" style="color:red">&middot;全部&nbsp;(${totalNum})</a>
										</s:if>
										<s:else>
										<a href="search.action?cid=1&keyWords=${keyWords}">&middot;全部&nbsp;(${totalNum})</a>
										</s:else>
										
										
									</div>
								</div>
							</li>
							<div class="clear"></div>
							<s:iterator value="cats" var="c">
							<!--2级分类开始-->
							<li>
								<div>
									<div class=second_fenlei>
										&middot;
									</div>
									<s:if test="id==cid">
										<div class=second_fenlei >
										<a href="search.action?cid=${id}&keyWords=${keyWords}" style="color:red">${name}&nbsp;(${pnum})</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="float:right"><a style="color:green" href="bookList.action?parentId=${parentId}&cid=${id}">该类所有</a></span>
										</div>
									</s:if>
									<s:else>
										<div class=second_fenlei>
										<a href="search.action?cid=${id}&keyWords=${keyWords}">${name}&nbsp;(${pnum})</a>
										</div>
									</s:else>
								</div>
							</li>
						   	<div class="clear"></div>
							<!--2级分类结束-->
							</s:iterator>
							<li>
								<div></div>
							</li>
						</ul>
					</div>
				</div>
			</div>

			<!--左栏结束-->
			
			<!--中栏开始-->
			<div class="book_center">
				
				<!--图书列表开始-->
				<div id="divRight" class="list_right">

					<div id="book_list" class="list_r_title">
						
						<!-- 
						<div class="list_r_title_text">
							排序方式
							
						</div>
						<select onchange="window.location='bookList.action?parentId=${parentId}&cid=${cid}&sort='+this.value" name='select_order' size='1' class='list_r_title_ml' id="sort11">
							<option value="timeUp" <s:if test="sort=='timeUp'">selected="selected"</s:if>>
								按上架时间 降序
							</option>
							<option value="priceUp" <s:if test="sort=='priceUp'">selected="selected"</s:if>>
								按产品价格 降序
							</option>
							<option value="hotUp" <s:if test="sort=='hotUp'">selected="selected"</s:if>>
								按销售数量 降序
							</option>
						</select>
						-->
						<div id="divTopPageNavi" class="list_r_title_text3">

							<!--分页导航开始-->
							<!--  
							<s:if test="currentPage>1">
							<div class='list_r_title_text3a'>
								<a name=link_page_next
									href="/dang/main/bookList.action?parentId=${parentId}&cid=${cid}&currentPage=${currentPage-1}&sort=${sort}">
								<img src='../images/page_up.gif' /> </a>
							</div>
							</s:if>
							<s:else>
								<div class='list_r_title_text3a'>
								<img src='../images/page_up_gray.gif' />
								</div>
							</s:else>
							
				
							<div class='list_r_title_text3b'>
								第${currentPage}页/共${totalPage}页
							</div>
							<s:if test="currentPage < totalPage">
							<div class='list_r_title_text3a'>
								<a name=link_page_next
									href="/dang/main/bookList.action?parentId=${parentId}&cid=${cid}&currentPage=${currentPage+1}&sort=${sort}" id="hr">
									<img src='../images/page_down.gif' /> </a>
							</div>
							</s:if>
							<s:else>
							<div class='list_r_title_text3a'>
								<img src='../images/page_down_gray.gif' />
							</div>
							</s:else>
							-->
							<!--分页导航结束-->
						</div>
					</div>
					
					<!--商品条目开始-->
					<s:iterator value="cats" var="c">
						<s:if test="id==cid">
							<s:if test="pnum==0"><span style="font-size:25px;color:red;margin-top:10px;text-align:center">此栏还未添加任何商品！</span></s:if>
						</s:if>
					</s:iterator>
				<s:if test="books!=null">
					<s:iterator value="books">
						<div class="list_r_line"></div>
						<div class="clear"></div>

						<div class="list_r_list">
							<span class="list_r_list_book"><a name="link_prd_img" href='bookdetail.action?id=${id}'>
								<img src="../productImages/${productPic}" /> </a> </span>
							<h2>
								<a name="link_prd_name" href='bookdetail.action?id=${id}'>${productName}</a>
							</h2>
							<h3>
								顾客评分：100
							</h3>
							<h4 class="list_r_list_h4">
								作 者:
								<a href='#' name='作者'>${author}</a>
							</h4>
							<h4>
								出版社：
								<a href='#' name='出版社'>${publishing}</a>
							</h4>
							<h4>
								出版时间：${publishDTime}
							</h4>
							<h5>
								${description}
							</h5>
							<div class="clear"></div>
							<h6>
								<span class="del">￥${fixedPrice}</span>
								<span class="red">￥${dangPrice}</span>
								节省：￥${fixedPrice-dangPrice}
							</h6>
							<span class="list_r_list_button"> </span>
							<div class="list_r_list_img" id="img">
							<s:if test="#session.cart==null">
							
							<a href="javscrip:;" rel="${id}" id="buy" > 
							<img src='../images/buttom_goumai.gif' id="image"/></a>
							
							
							</s:if>
							<s:else>
							<s:iterator value="#session.cart.buyItems" var="item">
								<s:if test="#item.pro.id==id">
								<span style="color:green">已经购买了</span>
								</s:if>
							
							</s:iterator>
							<a href="javscrip:;" rel="${id}" id="buy" > 
								<img src='../images/buttom_goumai.gif' id="image"<s:iterator value="#session.cart.buyItems" var="item">
								<s:if test="#item.pro.id==id">style="display:none"
								</s:if>
							</s:iterator>/>
							</a>
							</s:else>
							</div>
						</div>
						<div class="clear"></div>
		</s:iterator>
	</s:if><s:else><span>查询结果为空！</span></</s:else>
						
					
						<!--商品条目结束-->

					<div class="clear"></div>
					<div id="divBottomPageNavi" class="fanye_bottom">
					</div><span></span>

				</div>
				<!--图书列表结束-->

			</div>
			<!--中栏结束-->
			<div class="clear"></div>
		</div>

		<!--页尾开始 -->
		<%@include file="../common/foot.jsp"%>
		<!--页尾结束 -->
	</body>
</html>
